<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- Head BEGIN -->
<head>
  <meta charset="utf-8">
  <title>留言管理-{$site_config['site_title']}</title>
  <meta content="{$site_config['site_description']}" name="description">
  <meta content="{$site_config['site_keywords']}" name="keywords">
  <meta property="og:site_name" content="{$site_config['site_name']}">
  <meta property="og:title" content="{$site_config['site_title']}">
  <meta property="og:description" content="{$site_config['site_description']}">
  <meta property="og:type" content="website">
  <meta property="og:image" content=""><!-- link to image for socio -->
  <meta property="og:url" content="">

  {template tpl_header_source.html}
</head>
<!-- Head END -->

<!-- Body BEGIN -->
<body>
    {template tpl_header.html}

    <div class="main">
      <div class="container">
        <!-- BEGIN SIDEBAR & CONTENT -->
        <div class="row margin-bottom-40">
          {template member-left.html}

          <!-- BEGIN CONTENT -->
          <div class="col-md-9 col-sm-9">
          	{if($msg_list)}
          	<div class="row">
              <div class="col-md-12 col-sm-12">
              	{loop $msg_list $k1 $v1}
              	{php}$msg_list_n = isset($msg_list_n)?$msg_list_n+1:1;{/php}
              	<div class="panel panel-default data-list-{$v1['id']}" data-json='{php}echo json_encode($v1);{/php}'>
								  <div class="panel-heading">
							      <h4 class="panel-title" title="{php}echo date('Y-m-d H:i:s', $v1['atime']);{/php}">
							         <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion1" href="#accordion1_{$k1}" index="fc">
							         #{$msg_list_n}. {$v1['title']}
							         </a>
							         <a href="javascript:apps['member-msg-edit']({$v1['id']});" class="pull-right fa fa-pencil-square" title="edit"></a>
							         <a href="javascript:apps['member-msg-reply']({$v1['id']});" class="pull-right fa fa-reply" title="reply"></a>
							      </h4>
								  </div>
								  <div id="accordion1_{$k1}" class="panel-collapse collapse" style="height: 0px;">
							      <div class="panel-body">{$v1['content']}
							      	{if($v1['reply'])}
							      	{loop $v1['reply'] $k2 $v2}
							      	<div class="panel-body {$v2['user_id']<1?'text-success':''}" title="{php}echo date('Y-m-d H:i:s', $v2['atime']);{/php}">
							      		<i class="fa fa-quote-left"></i>&nbsp;{$v2['content']}&nbsp;<i class="fa fa-quote-right"></i>
							      	</div>
							      	{/loop}
							      	{/if}
							      </div>
								   </div>
								</div>
              	{/loop}
            	</div>
           	</div>
           	{/if}
            <div class="content-form-page">
              <div class="row">
                <div class="col-md-12 col-sm-12">
                  <form class="form-horizontal" role="form" method="post" action="" onsubmit="ecms.ajaxForm(this, apps['member-msg-submit'], false);return false;">
                  	<input type="hidden" name="act" value="msg_save" />
                  	<input type="hidden" name="msg_id" value="0" />
                  	<input type="hidden" name="id" value="0" />
                    <fieldset>
	                  	<legend>编辑留言</legend>
                      <div class="form-group">
                        <label for="title" class="col-lg-2 control-label">主题 <span class="require">*</span></label>
                        <div class="col-lg-10">
                          <input type="text" class="form-control" id="title" name="title" value="">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="content" class="col-lg-2 control-label">内容</label>
                        <div class="col-lg-10">
                          <textarea class="form-control" rows="8" id="content" name="content"></textarea>
                        </div>
                      </div>
                    </fieldset>
                    <div class="row">
                      <div class="col-lg-10 col-md-offset-2 padding-left-0 padding-top-20">                        
                        <button type="submit" class="btn btn-primary">保存</button>
                        <button type="reset" class="btn btn-default" onclick="apps['member-msg-reset']();">重置</button>
                      </div>
                    </div>
                  </form>
                </div>
              </div>
            </div>
          </div>
          <!-- END CONTENT -->
        </div>
        <!-- END SIDEBAR & CONTENT -->
      </div>
    </div>

    {template tpl_brands.html}

    {template tpl_steps.html}

    {template tpl_footer.html}

    <!-- BEGIN PAGE LEVEL JAVASCRIPTS (REQUIRED ONLY FOR CURRENT PAGE) -->
    <script type="text/javascript" src="assets/plugins/fancybox/source/jquery.fancybox.pack.js"></script><!-- pop up -->
    <script type="text/javascript" src="assets/plugins/bxslider/jquery.bxslider.min.js"></script><!-- slider for products -->
    <script src="assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
    <script type="text/javascript">
        jQuery(document).ready(function() {
            App.init();
            App.initUniform();
            App.initBxSlider();
        });
    </script>
    <!-- END PAGE LEVEL JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>